package cn.lan.scau_hotel_service.repository;

import cn.lan.scau_hotel_service.entity.Order;
import cn.lan.scau_hotel_service.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderRepository extends JpaRepository<Order,Integer>{

    Order getOrderById(int id);

    List<Order> getOrderByBooker(User user);


    int deleteOrderById(int id);

    List<Order> findAll();

    List<Order> findAllByBookerEquals(User user);
}
